﻿using Acadsoc.Middleware;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Owin
{
    public static class TestExtensions
    {
        /// <summary>
        /// Permit only authenticated requests beyond this point in the pipeline.
        /// </summary>
        /// <param name="builder"></param>
        /// <returns></returns>
        public static IAppBuilder UseTest(this IAppBuilder builder, CustomAuthenticationOptions options)
        {
            if (builder == null)
            {
                throw new ArgumentNullException("builder");
            }

            return builder.Use(typeof(TestMiddleware), options);
        }
    }
}
